<template>
  <div class="article_container">
    <a href="javascript:;">
      <div>
        <div class="images_area">
          <!-- <img src="/static/video/artical_cover.webp" class="card_1" /> -->
          <img :src="cover" v-for="cover in articalMsg.covers" :class="`card_${articalMsg.covers.length}`"/>
        </div>
        <div class="text_area">
          <div class="title">
            {{ articalMsg.title }}
          </div>
          <div class="content">
            {{ articalMsg.content }}
          </div>
        </div>
      </div>
    </a>
  </div>
</template>

<script>
export default {
  props: {
    articalMsg: {
      typeof: Object,
      required: true,
    },
  },
};
</script>

<style lang="scss">
a {
  text-decoration: none;
  outline: none;
}
.article_container {
  width: 520px;
  background-color: #fff;
  cursor: pointer;
  // border-top: 1px solid #e5e9ef;
  text-align: left;
  border: 1px solid #e5e9ef;
  border-radius: 4px;
  &:hover .text_area {
    box-shadow: 0 3px 10px 0 rgba(213, 216, 219, 0.44);
  }
  &:hover .text_area .title {
    color: #00a1d6;
  }
  .images_area {
    width: 100%;
    height: 120px;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
    img {
      width: 170px;
      height: 100%;
      margin-left: 5px;
      &:first-child {
        margin: 0;
      }
    }
    .card_1 {
      width: 100%;
      margin: 0;
    }
  }
  .text_area {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 20px 14px;
    transition: box-shadow 0.2s bezier(0.22, 0.58, 0.12, 0.98);
    .title {
      height: 22px;
      line-height: 22px;
      font-size: 16px;
      color: #212121;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      margin-bottom: 6px;
      transition: color 0.2s cubic-bezier(0.22, 0.58, 0.12, 0.98);
    }
    .content {
      overflow: hidden;
      text-overflow: ellipsis;
      word-break: break-all;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      font-size: 12px;
      line-height: 19px;
      max-height: 3.1666666666666667em;
      color: #666;
    }
  }
}
</style>